Carbon


FSpOpenDF

Header: Files.h Carbon status: Supported

Opens a file’s data fork.

OSErr FSpOpenDF (
    const FSSpec *spec, 
    SInt8 permission, 
    SInt16 *refNum
);
Parameter descriptions
spec

A pointer to an FSSpec structure specifying the file whose data fork is to be opened.

permission

A constant indicating the desired file access permissions. In most cases, you can simply set the permission parameter to fsCurPerm. Some applications request fsRdWrPerm, to ensure that they can both read from and write to a file.

refNum

On return, a pointer to a reference number of an access path to the file’s data fork. You can pass this reference number as a parameter to any of the low- or high-level file access functions.

function result

A result code.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)